from email.policy import default

from app import db, loginmanager
from datetime import datetime


class User(db.Model):
    __tablename__ = 'sys_user'
    
    id = db.Column(db.String(36), primary_key=True)
    username = db.Column(db.String(100), unique=True, index=True, comment='用户名')
    password = db.Column(db.String(100), comment='密码')
    country = db.Column(db.String(100), comment='国家/地区')
    company_name = db.Column(db.String(100), default='', comment='公司名')
    email = db.Column(db.String(50), comment='电子邮箱')
    phone = db.Column(db.String(20), comment='电话号码')
    status = db.Column(db.Integer, comment='状态 1启用 0禁用')
    created_at = db.Column(db.DateTime, default=datetime.now)
    updated_at = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)



